<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
<a href="add">添加</a>
		<table border="1"> 
			<tr>
				<td>ID</td>
				<td>姓名</td>
				<td>年龄</td>
				<td>性别</td>
				<td>操作</td>
			</tr>
			<?php foreach ($data as $key => $val) { ?>
			<tr>
				<td><?=$val->id ?></td>
				<td><?=$val->name ?></td>
				<td><?=$val->age ?></td>
				<td><?=$val->sex ?></td>
				<td>
					<a href="delete?id=<?=$val->id ?>">删除</a>
					<a href="upe?id=<?=$val->id ?>">修改</a>
				</td>
			</tr>
			<?php } ?>
		</table>
</body>
</html>